# Contributor: Robert Sacks <robert@sacks.email>
# Maintainer: Robert Sacks <robert@sacks.email>
pkgname=py3-requests-mock
pkgver=1.9.3
pkgrel=0
pkgdesc="Mock out responses from the requests package"
url="https://pypi.org/project/requests-mock/"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-requests py3-six"
makedepends="py3-setuptools py3-pbr"
checkdepends="py3-fixtures py3-mock py3-purl py3-pytest py3-sphinx py3-testrepository py3-testtools"
options="!check" # Requires unittest2
source="https://files.pythonhosted.org/packages/source/r/requests-mock/requests-mock-$pkgver.tar.gz"
builddir="$srcdir/requests-mock-$pkgver"

prepare() {
	default_prepare
	sed -i 's/python/python3/' .testr.conf
}

build() {
	python3 setup.py build
}

check() {
	python3 setup.py testr
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
bcded541d78670a1b1fc87f97d35286ab4bafd6946beb9d9b44886454c26a4d8c05834add18914f3f72b1d3c0534311efd1cc80e711b5085eb63053ae24cbb6f  requests-mock-1.9.3.tar.gz
"
